import React from 'react'
import { Route } from 'react-router-dom'
import Welcome from '@/components/welcome';
import PageA from '@/components/pageA';
import UserManage from '@/container/userManage';

export const RouteWithSubRoutes = route => (
    <Route
        path={route.path}
        exact={route.exact}
        render={props => (
            <route.component {...props} routes={route.routes} />
        )}
    />
)

export const Routes = [
    {
        path: '/',
        key: 'index',
        breadcrumbName: '首页',
        exact: true,
        component: Welcome,
    }, {
        path: '/counter',
        key: 'counter',
        breadcrumbName: '计时器',
        component: PageA,
    }, {
        path: '/userManage',
        key: 'userManage',
        breadcrumbName: '用户管理',
        component: UserManage,
    },
]

